import request from '@/utils/request'


/**
 * get请求参数
 * @param url
 * @param params
 * @returns {AxiosPromise}
 */
export function get(url, params) {
  return request({
    url: url,
    method: 'get',
    params: params
  })
}


/**
 * post 请求
 * @param url
 * @param params
 * @returns {AxiosPromise}
 */
export function post(url, params) {
  return request({
    url: url,
    method: 'post',
    data: params
  })
}


/**
 * del 请求
 * @param url
 * @param params
 * @returns {AxiosPromise}
 */
export function del(url) {
  return request({
    url: url,
    method: 'delete',
  })
}


/**
 * 导出
 * @param params
 * @param url
 * @returns {AxiosPromise}
 */
export function exp(url, params) {
  return request({
    url: url,
    method: 'get',
    params: params,
    responseType: 'blob'
  })
}
